<%@ page language="java" contentType="text/html; charset=UTF-8"  pageEncoding="UTF-8"%>
<script type="text/javascript">
  $(function(){
	  var url="${base}system/sysUser/userList";
	  initBsTable("datagrid",{
	  url:url,
	  columns : [{align : 'center',valign : 'middle',checkbox:true,width:'20px'},
				        {field:'userName',title:'姓名',width:80,sortable:true,valign:'middle',formatter:function(v,r,d){return '<a href="'+'#'+'" >'+v+'</a>';}}, 
				        {field:'userAccount',title:'系统账号',width:100,sortable:true,valign:'middle'},
				        {field:'deptAbbr',title:'机构部门',width:100,sortable:true,valign:'middle'},
				        {field:'roleList',title:'已分配角色',width:100,sortable:true,valign:'middle'},
				        {field:'tel',title:'联系电话',width:100,sortable:true,valign:'middle'},
				        {field:'email',title:'邮箱地址',width:150,sortable:true,valign:'middle'}
				        ]});
        $("#addBtn").click(function(){
        	_ajaxHtml("${base}system/sysUser/addPage",function(data){
        		$("div[data-modal-leve=1]").remove();
        		$("#main_content").append(data);
        		window.scrollTo(0,document.getElementById("dialog-box").offsetTop);
        	});
        });        
});
 
</script>
<div>
    <!-- 查询栏 -->
	<div id="custom-condition">
		<div class="box box-primary box-condition">
			<div class="box-header with-border">
				<button type="button" class="btn btn-box-tool box-title" data-widget="collapse"> 查询条件 <i class="fa fa-angle-double-down"></i></button>
				<div class="box-tools pull-right"> 
				    <button type="button" class="btn btn-md btn-default" data-condition="reset"> <i class="fa fa-eraser"></i>重置 </button>
					<button type="button" class="btn btn-md btn-info" data-condition="search"> <i class="glyphicon glyphicon-search"></i>查询 </button>
				</div>
			</div>
			<div class="box-body">
				<form class="form-horizontal form-condition">
					<div class="col-sm-3">
						<div class="form-group">
							<label  class="col-sm-3 control-label">姓名</label>
							<div class="col-sm-7">
								<input type="text" class="form-control"  name="params['userName']" placeholder="姓名,模糊查询"/>
							</div>
						</div>
					</div>
					<div class="col-sm-3">
						<div class="form-group">
							<label class="col-sm-3 control-label">账号</label>
							<div class="col-sm-7">
								<input type="text" class="form-control"  name="params['userAccount']" placeholder="账号,模糊查询"/>
							</div>
						</div>
					</div>
					<div class="col-sm-3">
						<div class="form-group">
							<label  class="col-sm-3 control-label">邮箱</label>
							<div class="col-sm-7">
								<input type="text" class="form-control"  name="params['email']" placeholder="邮箱,模糊查询"/>
							</div>
						</div>
					</div>
					<div class="col-sm-3">
						<div class="form-group">
							<label  class="col-sm-3 control-label">电话</label>
							<div class="col-sm-7">
								<input type="text" class="form-control"  name="params['tel']" placeholder="电话,模糊查询"/>
							</div>
						</div>
					</div>
					<div style="clear: both;"></div>
					<div id="condition-more">
						<!--  此处高级查询条件 -->
						<div class="col-sm-3">
							<div class="form-group">
								<label  class="col-sm-3 control-label">部门</label>
								<div class="col-sm-7">
								    <select class="form-control"  name="params['deptId']" >
								        <option>--部门--</option>
								    </select>
								</div>
							</div>
						</div>
						<div class="col-sm-3">
							<div class="form-group">
								<label class="col-sm-3 control-label">角色</label>
								<div class="col-sm-7">
								   <select class="form-control"  name="params['role']" >
								        <option>--角色--</option>
								    </select>
								</div>
							</div>
						</div>
						<div class="col-sm-3">
							<div class="form-group">
								<label  class="col-sm-3 control-label">状态</label>
								<div class="col-sm-7">
									<select class="form-control"  name="params['userStatus']" >
								        <option>--状态--</option>
								    </select>
								</div>
							</div>
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>
	 <!-- 工具栏 -->
	<div id="custom-toolbar">
     <div class="form-inline">
	     	 <button  class="btn btn-sm btn-success " id="addBtn"><span class="glyphicon glyphicon-plus"></span>添加</button>
	     	 <button  class="btn btn-sm btn-primary disabled select-one" id="updateBtn"><span class="glyphicon glyphicon-pencil"></span>编辑</button>
	     	 <button  class="btn btn-sm btn-primary disabled select-one" id="pwdBtn"><span class="glyphicon glyphicon-wrench"></span>重置密码</button>
         	 <button  class="btn btn-sm btn-danger disabled select-multi" id="deleteBtn"><span class="glyphicon glyphicon-remove"></span>删除</button>
    	</div>
  </div>
    <table id="datagrid"> </table>
</div>
 